package cn.heiliu.selenium.service;

import org.openqa.selenium.TimeoutException;

import java.util.Set;

/**
 * @author wangyelou
 * @date 2021/6/14
 */
public interface ISeleniumPoolService {

    /**
     * 池中获取有效的webdriver
     * @param timeout
     * @return
     * @throws TimeoutException
     */
    public IWebDriverService getWebDriver(long timeout) throws TimeoutException;

    /**
     * 释放webdriver
     * @param webDriver
     */
    public void release(IWebDriverService webDriver);

    /**
     * 返回当前可用webdriver数量
     * @return
     */
    public int getValidNum();

}
